<template>
  <div>
    <to-search></to-search>
     <v-list :list=goodData></v-list>
  </div>
</template>

<script>
import {reqList} from '../../http/http'

export default {
  data() {
    return {
      goodData: [],
    };
  },
  mounted() {
    this.getGoodsList();
  },
  methods: {
    async getGoodsList() {
      let {data:res} = await reqList({cateid:this.$route.query.id,type:this.$route.query.type?2:1})
      if (res.code == 200) {
        console.log(res);
        this.goodData = res.list.goodData ? res.list.goodData : [];
      }
    },
  },
};
</script>

<style scoped>
.item {
  padding: 0.2rem;
  background: orange;
  border-radius: 0.1rem;
  margin-bottom: 0.2rem;
}
.item img {
  width: 70vw;
  height: 3rem;
}
</style>